import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

public class Test {
    public static void main(String[] args) {
        String str = "";
        StringBuffer stringBuffer = new StringBuffer();
        for (int i = 0; i < 100; i++) {
            stringBuffer.appe  nd(str).append(i);
        }
    }

    public static void main3(String[] args) {
        String s = "";
        for (int i = 0; i < 10000; i++) {
            s += i;
        }
    }

    public static void main2(String[] args) {
        long start = System.currentTimeMillis();
        String s = "";
        for (int i = 0; i < 10000; i++) {
            s += i;
        }
        long end = System.currentTimeMillis();
        System.out.println(end - start);


        start = System.currentTimeMillis();
        StringBuffer stringBuffer = new StringBuffer("");
        for (int i = 0; i < 10000; i++) {
            stringBuffer.append(i);
        }
        end = System.currentTimeMillis();
        System.out.println(end - start);
    }


    public static void main1(String[] args) {
        final int[] array = {1,2,3,4};
        //array = new int[10]; err
        array[0] = 12;
        String s = "hello";
        s += "world";
        System.out.println(s); //输出hello world
     }


}
